Skip to content

Fix MimeMessage::extract_uue() ignoring index greater than zero#73

Closed
iliaal wants to merge 1 commit into
php:masterfrom
iliaal:fix/extract-uue-index
Closed

Fix MimeMessage::extract_uue() ignoring index greater than zero#73
iliaal wants to merge 1 commit into
php:masterfrom
iliaal:fix/extract-uue-index

Conversation

@iliaal

@iliaal iliaal commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What

MimeMessage::extract_uue($index, ...) returns NULL for any $index >= 1, so only the first uuencoded attachment in a message is reachable.

The method compares a part counter nparts against $index but never increments it, unlike the sibling enum_uue which does. So nparts == index only ever matches index 0.

Fix

Increment nparts after skipping a non-matching part, so the counter advances to the requested index.

@remicollet

Copy link
Copy Markdown
Member

Merged with 062ddea
Thanks

@remicollet remicollet closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants